/**
 * Copyright &copy; 2012-2016 <a href="https://git.oschina.net/zdw2016/webbase5">Webbase</a> All rights reserved.
 */
package com.foreveross.webbase.projectdemo.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.foreveross.webbase.common.persistence.DataEntity;

/**
 * 服务器管理Entity
 * @author yangwanli
 * @version 2017-03-16
 */
public class Server extends DataEntity<Server> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 服务器名称
	private String intranetip;		// 内网IP
	private String extraneip;		// 外网IP
	private String domain;		// 域名
	private String remark;		// 备注
	private Date creattime;		// 添加时间
	private String servertype;		// 服务器类型
	private String user;
	private String password;
	public Server() {
		super();
	}

	/**
	 * @param id
	 */
	public Server(String id){
		super(id);
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Length(min=0, max=32, message="服务器名称长度必须介于 0 和 32 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=64, message="内网IP长度必须介于 0 和 64 之间")
	public String getIntranetip() {
		return intranetip;
	}

	public void setIntranetip(String intranetip) {
		this.intranetip = intranetip;
	}
	
	@Length(min=0, max=64, message="外网IP长度必须介于 0 和 64 之间")
	public String getExtraneip() {
		return extraneip;
	}

	public void setExtraneip(String extraneip) {
		this.extraneip = extraneip;
	}
	
	@Length(min=0, max=64, message="域名长度必须介于 0 和 64 之间")
	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}
	
	@Length(min=0, max=255, message="备注长度必须介于 0 和 255 之间")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreattime() {
		return creattime;
	}

	public void setCreattime(Date creattime) {
		this.creattime = creattime;
	}
	
	@Length(min=0, max=255, message="服务器类型长度必须介于 0 和 255 之间")
	public String getServertype() {
		return servertype;
	}

	public void setServertype(String servertype) {
		this.servertype = servertype;
	}
	
}